package cn.cdutetc.library.entity.dto;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Past;
import jakarta.validation.constraints.Positive;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 图书更新DTO
 */
@Data
public class BookUpdateDTO {
    @NotNull(message = "图书ID不能为空")
    private Integer bookId;
    
    @Length(min = 10, max = 13, message = "ISBN长度必须为10-13位")
    private String isbn;
    
    private String bookName;
    
    private String author;
    
    private String publisher;
    
    @Past(message = "出版日期必须是过去的日期")
    private LocalDate publishDate;
    
    private String categoryName;
    
    @Positive(message = "价格必须大于0")
    private BigDecimal price;
    
    private String location;
    
    private String description;

}